package com.vhly.ddxdecompiler.dexreader.file.mixeditem;

import com.vhly.ddxdecompiler.dexreader.file.DexFile;
import com.vhly.ddxdecompiler.dexreader.io.DexInputStream;

import java.io.ByteArrayInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 * Created by IntelliJ IDEA.
 * User: vhly
 * Date: 2009-10-15
 * Time: 12:34:58
 *
 * @author vhly[FR]
 */
public abstract class MemberIdItem extends IdItem {
    int classIdx;
    int typoidIdx;
    int nameIdx;

    protected DexFile dex;

    public MemberIdItem(DexFile dexFile) {
        dex = dexFile;
    }

    public void read(DexInputStream din) throws IOException {
        classIdx = din.readShort();
        typoidIdx = din.readShort();
        nameIdx = din.readInt();
    }

    public void write(DataOutputStream dout) throws IOException {
    }

    public abstract void reloc(ByteArrayInputStream bin, int offset);
}
